/**
 * Created by Administrator on 2016/2/19 0019.
 */
$(function(){
  var socket = io();
  var showMes = $('.showMes ul');
  var mesCon = $('.mesCon');
  socket.on('news',function(data) {
    showMes.append('<li>'+ data.hello+'</li>')
  });
  $('.sendMes').click(function() {
    socket.emit('clientMes',mesCon.val());
    mesCon.val('');
  });
  socket.on('serverMes',function(data) {
    showMes.append('<li>'+ data+'</li>');
  });
});
